<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <title>优惠券进件资料</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="referrer" content="never">
    <meta http-equiv="Pragma"   content= "no-cache" /> 
    <meta http-equiv= "Cache-Control"   content= "no-cache" /> 
    <meta http-equiv= "Expires"   content= "0" />

    <link rel="stylesheet" href="/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/layui/style/admin.css" media="all" />

</head>

<body>

<form class="layui-form" lay-filter="cpn_mach_info_form" action="" style=" width:60%;margin: 0 auto">
    <input type="hidden" id="id" name="id" th:value="${cpnMchInfo.id}"/>
    <input type="hidden" id="oemId" name="oemId" th:value="${cpnMchInfo.oemId}"/>
    <input type="hidden" id="userId" name="userId" th:value="${cpnMchInfo.userId}"/>

    <legend><span style="color: red">注意图片上传时大小限制在2M内</span></legend><br>


    <div style="padding-left: 110px">
        <span style="color: red">注意:</span>
        <span >(12个汉字内),该名称将在制券时填入并显示在卡券页面上</span>
    </div>
    <div class="layui-form-item " >

        <label class="layui-form-label"><span style="color: red">*</span>子商户(店铺名称):</label>
        <div class="layui-input-block">
            <input type="text" name="brand_name"  lay-verify="required" th:value="${cpnMchInfo.brand_name}"    placeholder="请输入子商户名称" autocomplete="off" class="layui-input">
        </div>
    </div>


 <!--   <div style="padding-left: 110px">
        <span style="color: red">注意:</span>
        <span >公众号为选填,有公众号的商家可填写</span>
    </div>
    <div class="layui-form-item " >

        <label class="layui-form-label">子商户(公众号):</label>
        <div class="layui-input-block">
            <input type="text" name="app_id"   th:value="${cpnMchInfo.app_id}"    placeholder="请输入子商户公众号" autocomplete="off" class="layui-input">
        </div>
    </div>-->

    <div class="layui-form-item" >
        <label class="layui-form-label"><span style="color: red">*</span>子商户logo:</label>
        <div class="layui-input-block logo_file">
            <div class="layui-upload-list">
                <input type="hidden" keyName="logo_url" lay-verify="logoVerify" name="logo_url" th:value="${cpnMchInfo.logo_url}" class="logo_file_input">
                <img class="layui-upload-img logo_file_img" style="max-width: 300px; max-height: 200px;" >
                <p class="fade_file_tip"></p>
            </div>
            <button type="button"  class="layui-btn layui-form-label logo_file_btn" >上传logo</button>
        </div>
    </div>


    <div class="layui-form-item" >
        <label class="layui-form-label"><span style="color: red">*</span>授权函:</label>
        <div class="layui-input-block face_file">
            <div class="layui-upload-list">
                <input type="hidden" keyName="protocol" lay-verify="protocolVerify" name="protocol" th:value="${cpnMchInfo.protocol}" class="media_file_input">
                <img class="layui-upload-img media_file_img" style="max-width: 300px; max-height: 200px;" >
                <p class="fade_file_tip"></p>
            </div>
            <button type="button"  class="layui-btn layui-form-label face_file_btn" >上传图片</button>
        </div>
    </div>

    <div class="layui-form-item " >
        <label class="layui-form-label"><span style="color: red">*</span>授权函有效期截止时间:</label>
        <div class="layui-input-inline">
            <input type="text" name="end_date" lay-verify="required" th:value="${cpnMchInfo.end_date}"  class="layui-input" id="end_date" placeholder="yyyy年MM月dd日" >
        </div>
    </div>


    <div class="layui-form-item " >
        <input type="hidden" id="primary_category_id" name="primary_category_id" th:value="${cpnMchInfo.primary_category_id}"/>
        <input type="hidden" id="secondary_category_id" name="secondary_category_id" th:value="${cpnMchInfo.secondary_category_id}"/>

        <input type="hidden" id="primary_name" name="primary_name" th:value="${cpnMchInfo.primary_name}"/>
        <input type="hidden" id="secondary_name" name="secondary_name" th:value="${cpnMchInfo.secondary_name}"/>

        <div class="layui-inline" style="padding-left: 20px">
            <label><span style="color: red">*</span>一级类目:</label>
            <select id="primary" lay-filter="primary" >

            </select>
        </div>


        <div class="layui-inline">
            <label><span style="color: red">*</span>二级类目:</label>
            <select id="secondary" lay-filter="secondary">
            </select>
        </div>

    </div>



    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend><span style="color: red">注意选择上传</span></legend><br>
        <p>1、授权函必须加盖企业公章，或个体户店铺章、发票专用章、财务章、合同章等具备法律效力的盖章，不可使用个人私章；</p>
        <p>2、若子商户是个体工商户，且无上述公章，授权函可用个体工商户经营者签字代替公章，且须同时额外上传《个体工商户营业执照》及该执照内登记的经营者的身份证彩照。（本方案仅适用于子商户是个体工商户，且无公章的场景。其他场景必须在授权函加盖公章）。</p>


        <div class="layui-form-item" >
            <label class="layui-form-label">营业执照:</label>
            <div class="layui-input-block face_file">
                <div class="layui-upload-list">
                    <input type="hidden" keyName="agreement_media_id" name="agreement_media_id" th:value="${cpnMchInfo.agreement_media_id}" class="media_file_input">
                    <img class="layui-upload-img media_file_img" style="max-width: 300px; max-height: 200px;" >
                    <p class="fade_file_tip"></p>
                </div>
                <button type="button"  class="layui-btn layui-form-label face_file_btn" >上传图片</button>
            </div>
        </div>


        <div class="layui-form-item" >
            <label class="layui-form-label">营业执照内登记的经营者身份证:</label>
            <div class="layui-input-block face_file">
                <div class="layui-upload-list">
                    <input type="hidden" keyName="operator_media_id" name="operator_media_id" th:value="${cpnMchInfo.operator_media_id}" class="media_file_input">
                    <img class="layui-upload-img media_file_img" style="max-width: 300px; max-height: 200px;" >
                    <p class="fade_file_tip"></p>
                </div>
                <button type="button"  class="layui-btn layui-form-label face_file_btn" >上传图片</button>
            </div>
        </div>
    </fieldset>

    <div class="layui-form-item " th:if="${cpnMchInfo.status==1}" >
        <label class="layui-form-label">处理信息:</label>
        <div class="layui-input-block" >
            <input type="text" name="lastMessage" style="color: red ;border: none;" value="正在审核中!" disabled  autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item " th:if="${cpnMchInfo.status==2}" >
        <label class="layui-form-label">处理信息:</label>
        <div class="layui-input-block" >
            <input type="text" name="lastMessage" style="color: red ;border: none;" value="审核通过!" disabled  autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item " th:if="${cpnMchInfo.status==-1}" >
        <label class="layui-form-label">处理信息:</label>
        <div class="layui-input-block" >
            <textarea type="text" name="reason" style="color: red ;border: none;" th:text="${cpnMchInfo.reason}" disabled class="layui-textarea"></textarea>
        </div>
    </div>

    <div class="layui-form-item"  th:hidden = "${cpnMchInfo.status==1||cpnMchInfo.status==2||cpnMchInfo.status==-1}" >
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="cpn_form_ok">暂存</button>
            <button class="layui-btn" lay-submit="" lay-filter="cpn_form_apply">进件提交</button>
        </div>
    </div>

    <div class="layui-form-item"  th:if = "${cpnMchInfo.status==-1}" >
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="cpn_form_modify_submit">修改提交</button>
        </div>
    </div>

</form>

<script type="text/javascript" src="/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/js/cpn/cpn_mach_info.js"></script>

</body>
</html>